Classes whose instances will be stored in STL containers must have:
If the instances will be sorted or compared then the class must have:
In practice, it may be necessary to please the compiler gods by defining some functions that are never called. The practical list of requirements is:
With the current release of CodeWarrior, every user defined type (including pointers to predefined types) requires a special macro to be used inside an STL container:
struct ContainedObject { int a; } __MSL_FIX_ITERATORS__(ContainedObject);